import java.awt.Color;
import java.awt.Graphics;
import java.util.ArrayList;

public class DrawGraphics {
 //   ArrayList<Bouncer> bouncers;
 //   ArrayList<StraightMover> straighters;
    ArrayList<Mover> movers;

    /** Initializes this class for drawing. */
    public DrawGraphics() {
        movers = new ArrayList<>();
        movers.add(new Bouncer(0, 0, new Rectangle(10, 10, Color.RED)));
        movers.add(new Bouncer(10, 10, new Circle(10, 10, Color.BLUE)));
        movers.get(0).setMovementVector(10, 10);
        movers.get(1).setMovementVector(5, 15);
        movers.add(new StraightMover(50, 50, new Rectangle(10, 10, Color.RED)));
        movers.add(new StraightMover(60, 80, new Circle(10, 10, Color.BLUE)));
        movers.get(2).setMovementVector(10, 10);
        movers.get(3).setMovementVector(5, 15);


//        bouncers = new ArrayList<>();
//        bouncers.add(new Bouncer(0, 0, new Rectangle(10, 10, Color.RED)));
//        bouncers.add(new Bouncer(10, 10, new Circle(10, 10, Color.BLUE)));
//        bouncers.get(0).setMovementVector(10, 10);
//        bouncers.get(1).setMovementVector(5, 15);
//        
//        straighters = new ArrayList<>();
//        straighters.add(new StraightMover(50, 50, new Rectangle(10, 10, Color.RED)));
//        straighters.add(new StraightMover(60, 80, new Circle(10, 10, Color.BLUE)));
//        straighters.get(0).setMovementVector(10, 10);
//        straighters.get(1).setMovementVector(5, 15);

    }

    /** Draw the contents of the window on surface. */
    public void draw(Graphics surface) {
//        for(Bouncer b : bouncers){
//            b.draw(surface);
//        }
//        for(StraightMover s : straighters){
//            s.draw(surface);
//        }
        for(Mover m : movers){
            m.draw(surface);
        }
    }
}
